package com.hnas.trade.dao;

import java.util.List;

import com.hnas.core.dao.BaseDao;
import com.hnas.trade.dto.DTOOrder;
import com.hnas.trade.orm.Order;

public interface OrderDao extends BaseDao<Order>{
	Order saveOrUpdate(DTOOrder dto);//创建(修改)订单

	DTOOrder getByOrderNo(String orderNo);
	
	Order findByQRCode(String qrCode);
	
	void updateOrderStatus(String orderNo, String status);
	
	DTOOrder getBySwiftNumber(String swiftNumber);
	
	List<Order> getTodaySuccessOrder();

	List<Order> getEastSquarList(String date);

	int getEastSquarCount(String date);

	int getCountByActivity(String mrchId, String termNo, String id, String dateStr);

	int getCountByAccno(String accno, String activityId,String itemId, String dateStr);

	Order saveOrUpdate2(DTOOrder dto) throws Exception;
	/**
	 * 根据账户id和卡号查询记账的订单
	 * @param accId 账户id
	 * @param cardNo 卡号
	 * @return
	 */
	List<DTOOrder> listAccountOrder(String accId, String cardNo);

	int getOrderCountByCardNo(String cardNo);

}
